﻿using Microsoft.EntityFrameworkCore;
using OL.FrameCore.Application.Article.Dto;
using System;
using System.Collections.Generic;
using System.Text;

namespace OL.FrameCore.Application.Article
{
    public interface IArticleService
    {
        /// <summary>
        /// 获取文章列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        PageData<GetArticleListResponse> GetArticleList(GetArticleListRequest request);
        /// <summary>
        /// 获取文章
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        GetArticleResponse GetArticle(int id);
        /// <summary>
        /// 添加文章
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Result AddArticle(AddArticleRequest request);
        /// <summary>
        /// 修改文章
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Result UpdateArticle(UpdateArticleRequest request);
        /// <summary>
        /// 删除文章
        /// </summary>
        /// <returns></returns>
        Result DeleteArticle(int id,int userId);
        /// <summary>
        /// 获取文章浏览列表
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public IList<GetArticleViewListResponse> GetArticleViewList(int type = 1, int num = 10);
    }
}
